using UnityEngine;
using System.Collections;

public class StandardCat : Cat 
{	
	public Texture2D[] runningAnimation;
	public Texture2D[] attackingAnimation;
	public Texture2D[] deathAnimation;
	public int catFps;

	public override void Start () 
    {
        base.Start();
		
		SetAnimations(runningAnimation, attackingAnimation, deathAnimation, null, null);
	}

    public override void Update()
    {
        base.Update();

        gameAnimation.fps = catFps;
        gameAnimation.CalculateFps();

        if(base.attackMode && base.death == false)
        {
            RunAnimation("Second", "Loop");
        }

        if(base.death)
        {
            RunAnimation("Third", "Loop");
        }

        if(base.death == false && attackMode == false)
        {
            RunAnimation("First", "Loop");
        }
	}
	
	public override void Jump()
	{
		base.Jump();

        if(playerState != PlayerState.LaserMode)
        {
            meGo.transform.rotation = Quaternion.Euler(new Vector3(0, 0, 0));
            meGo.rigidbody.AddForce(new Vector3(-xJumpForce, yJumpForce, 0));
        }

        AudioPlayer.Play(AudioPlayer.CAT_ATTACK);
	}
}
